Integrand size = 26, antiderivative size = 112 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {(A-i B) x}{8 a^3}+\frac {i A-B}{6 d (a+i a \tan (c+d x))^3}+\frac {i A+B}{8 a d (a+i a \tan (c+d x))^2}+\frac {i A+B}{8 d \left (a^3+i a^3 \tan (c+d x)\right )} \]
1/8*(A-I*B)*x/a^3+1/6*(I*A-B)/d/(a+I*a*tan(d*x+c))^3+1/8*(I*A+B)/a/d/(a+I* a*tan(d*x+c))^2+1/8*(I*A+B)/d/(a^3+I*a^3*tan(d*x+c))
Time = 1.11 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.97 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {-10 A+2 i B+3 (i A+B) \arctan (\tan (c+d x)) \sec ^3(c+d x) (\cos (3 (c+d x))+i \sin (3 (c+d x)))+(-9 i A-9 B) \tan (c+d x)+3 (A-i B) \tan ^2(c+d x)}{24 a^3 d (-i+\tan (c+d x))^3} \]
(-10*A + (2*I)*B + 3*(I*A + B)*ArcTan[Tan[c + d*x]]*Sec[c + d*x]^3*(Cos[3* (c + d*x)] + I*Sin[3*(c + d*x)]) + ((-9*I)*A - 9*B)*Tan[c + d*x] + 3*(A - I*B)*Tan[c + d*x]^2)/(24*a^3*d*(-I + Tan[c + d*x])^3)
Time = 0.39 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.99, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {3042, 4009, 3042, 3960, 3042, 3960, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^3}dx\) |
\(\Big \downarrow \) 4009 |
\(\displaystyle \frac {(A-i B) \int \frac {1}{(i \tan (c+d x) a+a)^2}dx}{2 a}+\frac {-B+i A}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(A-i B) \int \frac {1}{(i \tan (c+d x) a+a)^2}dx}{2 a}+\frac {-B+i A}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3960 |
\(\displaystyle \frac {(A-i B) \left (\frac {\int \frac {1}{i \tan (c+d x) a+a}dx}{2 a}+\frac {i}{4 d (a+i a \tan (c+d x))^2}\right )}{2 a}+\frac {-B+i A}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(A-i B) \left (\frac {\int \frac {1}{i \tan (c+d x) a+a}dx}{2 a}+\frac {i}{4 d (a+i a \tan (c+d x))^2}\right )}{2 a}+\frac {-B+i A}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3960 |
\(\displaystyle \frac {(A-i B) \left (\frac {\frac {\int 1dx}{2 a}+\frac {i}{2 d (a+i a \tan (c+d x))}}{2 a}+\frac {i}{4 d (a+i a \tan (c+d x))^2}\right )}{2 a}+\frac {-B+i A}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {-B+i A}{6 d (a+i a \tan (c+d x))^3}+\frac {(A-i B) \left (\frac {\frac {x}{2 a}+\frac {i}{2 d (a+i a \tan (c+d x))}}{2 a}+\frac {i}{4 d (a+i a \tan (c+d x))^2}\right )}{2 a}\) |
(I*A - B)/(6*d*(a + I*a*Tan[c + d*x])^3) + ((A - I*B)*((I/4)/(d*(a + I*a*T an[c + d*x])^2) + (x/(2*a) + (I/2)/(d*(a + I*a*Tan[c + d*x])))/(2*a)))/(2* a)
3.1.55.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[a*((a + b*Tan[c + d*x])^n/(2*b*d*n)), x] + Simp[1/(2*a) Int[(a + b*Tan[c + d*x])^ (n + 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0] && LtQ[n, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*((a + b*Tan[e + f*x])^m/(2*a *f*m)), x] + Simp[(b*c + a*d)/(2*a*b) Int[(a + b*Tan[e + f*x])^(m + 1), x ], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2 , 0] && LtQ[m, 0]
Time = 0.08 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.14
method | result | size |
risch | \(-\frac {i x B}{8 a^{3}}+\frac {x A}{8 a^{3}}+\frac {{\mathrm e}^{-2 i \left (d x +c \right )} B}{16 a^{3} d}+\frac {3 i {\mathrm e}^{-2 i \left (d x +c \right )} A}{16 a^{3} d}-\frac {{\mathrm e}^{-4 i \left (d x +c \right )} B}{32 a^{3} d}+\frac {3 i {\mathrm e}^{-4 i \left (d x +c \right )} A}{32 a^{3} d}-\frac {{\mathrm e}^{-6 i \left (d x +c \right )} B}{48 a^{3} d}+\frac {i {\mathrm e}^{-6 i \left (d x +c \right )} A}{48 a^{3} d}\) | \(128\) |
derivativedivides | \(\frac {A \arctan \left (\tan \left (d x +c \right )\right )}{8 d \,a^{3}}-\frac {i B \arctan \left (\tan \left (d x +c \right )\right )}{8 d \,a^{3}}-\frac {i A}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {B}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {A}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )}-\frac {i B}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )}-\frac {A}{6 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{3}}-\frac {i B}{6 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{3}}\) | \(158\) |
default | \(\frac {A \arctan \left (\tan \left (d x +c \right )\right )}{8 d \,a^{3}}-\frac {i B \arctan \left (\tan \left (d x +c \right )\right )}{8 d \,a^{3}}-\frac {i A}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {B}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{2}}+\frac {A}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )}-\frac {i B}{8 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )}-\frac {A}{6 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{3}}-\frac {i B}{6 d \,a^{3} \left (\tan \left (d x +c \right )-i\right )^{3}}\) | \(158\) |
-1/8*I*x/a^3*B+1/8*x/a^3*A+1/16/a^3/d*exp(-2*I*(d*x+c))*B+3/16*I/a^3/d*exp (-2*I*(d*x+c))*A-1/32/a^3/d*exp(-4*I*(d*x+c))*B+3/32*I/a^3/d*exp(-4*I*(d*x +c))*A-1/48/a^3/d*exp(-6*I*(d*x+c))*B+1/48*I/a^3/d*exp(-6*I*(d*x+c))*A
Time = 0.24 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.68 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {{\left (12 \, {\left (A - i \, B\right )} d x e^{\left (6 i \, d x + 6 i \, c\right )} - 6 \, {\left (-3 i \, A - B\right )} e^{\left (4 i \, d x + 4 i \, c\right )} - 3 \, {\left (-3 i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + 2 i \, A - 2 \, B\right )} e^{\left (-6 i \, d x - 6 i \, c\right )}}{96 \, a^{3} d} \]
1/96*(12*(A - I*B)*d*x*e^(6*I*d*x + 6*I*c) - 6*(-3*I*A - B)*e^(4*I*d*x + 4 *I*c) - 3*(-3*I*A + B)*e^(2*I*d*x + 2*I*c) + 2*I*A - 2*B)*e^(-6*I*d*x - 6* I*c)/(a^3*d)
Time = 0.27 (sec) , antiderivative size = 258, normalized size of antiderivative = 2.30 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\begin {cases} \frac {\left (\left (512 i A a^{6} d^{2} e^{6 i c} - 512 B a^{6} d^{2} e^{6 i c}\right ) e^{- 6 i d x} + \left (2304 i A a^{6} d^{2} e^{8 i c} - 768 B a^{6} d^{2} e^{8 i c}\right ) e^{- 4 i d x} + \left (4608 i A a^{6} d^{2} e^{10 i c} + 1536 B a^{6} d^{2} e^{10 i c}\right ) e^{- 2 i d x}\right ) e^{- 12 i c}}{24576 a^{9} d^{3}} & \text {for}\: a^{9} d^{3} e^{12 i c} \neq 0 \\x \left (- \frac {A - i B}{8 a^{3}} + \frac {\left (A e^{6 i c} + 3 A e^{4 i c} + 3 A e^{2 i c} + A - i B e^{6 i c} - i B e^{4 i c} + i B e^{2 i c} + i B\right ) e^{- 6 i c}}{8 a^{3}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (A - i B\right )}{8 a^{3}} \]
Piecewise((((512*I*A*a**6*d**2*exp(6*I*c) - 512*B*a**6*d**2*exp(6*I*c))*ex p(-6*I*d*x) + (2304*I*A*a**6*d**2*exp(8*I*c) - 768*B*a**6*d**2*exp(8*I*c)) *exp(-4*I*d*x) + (4608*I*A*a**6*d**2*exp(10*I*c) + 1536*B*a**6*d**2*exp(10 *I*c))*exp(-2*I*d*x))*exp(-12*I*c)/(24576*a**9*d**3), Ne(a**9*d**3*exp(12* I*c), 0)), (x*(-(A - I*B)/(8*a**3) + (A*exp(6*I*c) + 3*A*exp(4*I*c) + 3*A* exp(2*I*c) + A - I*B*exp(6*I*c) - I*B*exp(4*I*c) + I*B*exp(2*I*c) + I*B)*e xp(-6*I*c)/(8*a**3)), True)) + x*(A - I*B)/(8*a**3)
Exception generated. \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\text {Exception raised: RuntimeError} \]
Time = 0.54 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.15 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^3} \, dx=-\frac {\frac {6 \, {\left (-i \, A - B\right )} \log \left (\tan \left (d x + c\right ) + i\right )}{a^{3}} + \frac {6 \, {\left (i \, A + B\right )} \log \left (\tan \left (d x + c\right ) - i\right )}{a^{3}} + \frac {-11 i \, A \tan \left (d x + c\right )^{3} - 11 \, B \tan \left (d x + c\right )^{3} - 45 \, A \tan \left (d x + c\right )^{2} + 45 i \, B \tan \left (d x + c\right )^{2} + 69 i \, A \tan \left (d x + c\right ) + 69 \, B \tan \left (d x + c\right ) + 51 \, A - 19 i \, B}{a^{3} {\left (\tan \left (d x + c\right ) - i\right )}^{3}}}{96 \, d} \]
-1/96*(6*(-I*A - B)*log(tan(d*x + c) + I)/a^3 + 6*(I*A + B)*log(tan(d*x + c) - I)/a^3 + (-11*I*A*tan(d*x + c)^3 - 11*B*tan(d*x + c)^3 - 45*A*tan(d*x + c)^2 + 45*I*B*tan(d*x + c)^2 + 69*I*A*tan(d*x + c) + 69*B*tan(d*x + c) + 51*A - 19*I*B)/(a^3*(tan(d*x + c) - I)^3))/d
Time = 7.61 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.99 \[ \int \frac {A+B \tan (c+d x)}{(a+i a \tan (c+d x))^3} \, dx=-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (\frac {B}{8\,a^3}+\frac {A\,1{}\mathrm {i}}{8\,a^3}\right )-\frac {A\,5{}\mathrm {i}}{12\,a^3}-\frac {B}{12\,a^3}+\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {3\,A}{8\,a^3}-\frac {B\,3{}\mathrm {i}}{8\,a^3}\right )}{d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^3\,1{}\mathrm {i}-3\,{\mathrm {tan}\left (c+d\,x\right )}^2+\mathrm {tan}\left (c+d\,x\right )\,3{}\mathrm {i}+1\right )}-\frac {x\,\left (B+A\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{8\,a^3} \]